//
//  WBDemoViewController.swift
//  MyWeibo
//
//  Created by timw on 2017/3/16.
//  Copyright © 2017年 wuqc. All rights reserved.
//

import UIKit

class WBDemoViewController: WBBaseViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        // 设置标题
        title = "第\(navigationController?.childViewControllers.count ?? 0)个"
    }

    @objc fileprivate func showNext() {
        
        let vc = WBDemoViewController()
        navigationController?.pushViewController(vc, animated: true)
    }
    

}

extension WBDemoViewController {
    override func setupTableView() {
        super.setupTableView()
        // 设置右侧的控制器
        navItem.rightBarButtonItem = UIBarButtonItem(title: "下一个", target: self, action: #selector(showNext))
    }

}
